import React from 'react';
import { connect } from 'react-redux'
import { addCount, minusCount } from '../store/actions'
class App extends React.Component {
  render() {
    return <div className=''>
      <button onClick={this.props.add}>+</button>
      <button onClick={this.props.minus}>-</button>
    </div>;
  }
}
App = connect(() => ({}), dispatch => {
  return {
    add() {
      let res = dispatch(addCount(5))
      console.log(res)
    },
    minus() {
      dispatch(minusCount(3))
    }
  }
})(App)
export default App